package spring.cloud.tasks.api.service;

import spring.cloud.tasks.api.domain.different_info.TaskDifferentInfo;

import java.util.List;

public interface ZooKeeperDatabaseTaskDifferentInfoService {

    /**
     * Diff the config data in zk and db of the same zk cluster.
     *
     * @param zooKeeperClusterKey zk cluster key.
     * @return The different info organized by job.
     */
    List<TaskDifferentInfo> differentByZooKeeperClusterKey(String zooKeeperClusterKey) throws RuntimeException;

    /**
     * Diff the config data in zk and db of nameSpace.
     *
     * @return The different info organized by job.
     */
    List<TaskDifferentInfo> differentByNameSpace(String nameSpace) throws RuntimeException;

    /**
     * Diff the config data in zk and db of job.
     *
     * @return The different info organized by job. If no difference, return null;
     */
    TaskDifferentInfo differentByTaskId(String nameSpace, String taskId) throws RuntimeException;
}
